#include <bits/stdc++.h>
using namespace std;

#define MAX 200200
const int MOD = 998244353;

int read() {
  int x = 0;
  bool t = false;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-')
    ch = getchar();
  if (ch == '-')
    t = true, ch = getchar();
  while (ch <= '9' && ch >= '0')
    x = x * 10 + ch - 48, ch = getchar();
  return t ? -x : x;
}

int C[100][100];
int k, n, ans;
int f[MAX][15], a[MAX][15];

inline void add(int &x, int a) { x = (x + a) % MOD; }

int main() {
  n = read();
  k = read();

  for (int i = 1; i <= n; ++i) {
    a[i][0] = 1;
    a[i][1] = read();
  }

  for (int i = 1; i <= n; ++i) {
    for (int j = 2; j <= k; ++j) {
      a[i][j] = 1LL * a[i][j - 1] * a[i][1] % MOD;
    }
  }

  for (int i = 0; i <= k; ++i)
    C[i][0] = C[i][i] = 1;
  for (int i = 2; i <= k; ++i) {
    for (int j = 1; j < i; ++j) {
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
    }
  }

  for (int i = 0; i <= k; ++i)
    f[1][i] = a[1][i];

  for (int i = 2; i <= n; ++i) {
    for (int j = 0; j <= k; ++j) {
      f[i][j] = a[i][j];
      for (int l = 0; l <= j; ++l) {
        add(f[i][j], 1LL * C[j][l] * a[i][l] % MOD * f[i - 1][j - l] % MOD);
      }
    }
  }

  for (int i = 1; i <= n; ++i)
    add(ans, f[i][k]);
  printf("%d\n", ans);
  return 0;
}
